﻿using BaseUi.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace BaseUi
{
    /// <summary>
    /// 用户信息
    /// </summary>
    public partial class UserInfoView : Window
    {
        public static UserInfoViewModel viewModel = new UserInfoViewModel();

        /// <summary>
        /// 点击退出登录
        /// </summary>
        public bool IsExitLogin = false;
        public UserInfoView()
        {
            InitializeComponent();

            this.DataContext = viewModel;
        }

        private void tcdl(object sender, RoutedEventArgs e)
        {
            IsExitLogin = true;
            viewModel.IsLogin = false;
            viewModel.User = null;
            viewModel.Roles = new List<RoleBase>();
            this.Close();
        }
    }
}
